package com.tth.learn.addproperties.java.com.tth.learn.java1;

import java.util.ArrayList;

/**
 * 自定义注解   参照@SuppressWarnings
 * @Author tth
 * @Date 2022/12/9 14:47
 */
public class AnnotationTest {
    public static void main(String[] args) {
    }
}

//@MyAnnotations({@MyAnnotation("hello"), @MyAnnotation("hi")})
@MyAnnotation("hello")
@MyAnnotation("hi")
class Person {
    private String name;
    private Integer age;

    public Person() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}

class Generic <T> {
        public void show() throws @MyAnnotation RuntimeException{
            ArrayList<@MyAnnotation String> list = new ArrayList<>();

            int num = (@MyAnnotation int) 10L;
        }
}